function [matrix,data] = generateFakeData(matrix,data,cfg)
    ROI = data.ROI;
    %only this roi will be read out

    %matrix(x,y,z)
    %x=voxels (position)
    %y=volumes (time)
    %z=session
    
    mode = 'simple';
    
    switch mode
        case 'withhrfconvolution'
            newmat = zeros(size(matrix.(ROI)));

            newmat( 1,:,:) = data.orgWantedTimecourse==-cfg.CCWcode & data.orgStateTimecourse==-cfg.CCWcode;
            newmat( 2,:,:) = data.orgWantedTimecourse==-cfg.CCWcode & data.orgStateTimecourse== cfg.CCWcode;
            newmat( 3,:,:) = data.orgWantedTimecourse== cfg.CCWcode & data.orgStateTimecourse==-cfg.CCWcode;
            newmat( 4,:,:) = data.orgWantedTimecourse== cfg.CCWcode & data.orgStateTimecourse== cfg.CCWcode;

            matrix.(ROI) = newmat;
            
        case 'withhrfconvolution'
            newmat = zeros(size(matrix.(ROI)));

            p = [6 16 1 1 6 0 32];      % Is default
            hrf = spm_hrf_backup(cfg.Tr/1000, p);
            
            newmat( 1,:,:) = matconv(data.orgWantedTimecourse==-cfg.CCWcode & data.orgStateTimecourse==-cfg.CCWcode,hrf);
            newmat( 2,:,:) = matconv(data.orgWantedTimecourse==-cfg.CCWcode & data.orgStateTimecourse== cfg.CCWcode,hrf);
            newmat( 3,:,:) = matconv(data.orgWantedTimecourse== cfg.CCWcode & data.orgStateTimecourse==-cfg.CCWcode,hrf);
            newmat( 4,:,:) = matconv(data.orgWantedTimecourse== cfg.CCWcode & data.orgStateTimecourse== cfg.CCWcode,hrf);
            
            matrix.(ROI) = newmat;  
        case 'toconvolvedtimecourse'
            newmat = zeros(size(matrix.(ROI)));

            newmat( 1,:,:) = data.LLselection;
            newmat( 2,:,:) = data.LRselection;
            newmat( 3,:,:) = data.RLselection;
            newmat( 4,:,:) = data.RRselection;

            matrix.(ROI) = newmat;
    end
    

end

function ret = matconv(mat1,mat2)
    ret = zeros(size(mat1,1)+size(mat2,1)-1,size(mat1,2));

    for k=1:size(mat1,2)
        ret(:,k) = conv(double(mat1(:,k)),mat2);
    end
    
    ret = ret(1:size(mat1,1),:);
end